package ch6;

import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class Huiwen {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        System.out.print("请输入一个数：");
        int i = 0;
        int num = in.nextInt();
        int b=0;
        int t=num;
        while (num != 0) {
            i = (num % 10);
            b= b*10+i;
            num = num / 10;
        }
        System.out.println(b);
        if(t==b){
            System.out.println("这个数是回文数");
        }else{
            System.out.println("不是回文数");
        }
    }
}
